<!DOCTYPE html>
<html xmlns=http://www.w3.org/1999/xhtml xmlns:bd=http://www.baidu.com/2010/xbdml>
<head>
    <meta http-equiv="Content-Type" content="text/html" charset="utf-8">
    <title>编辑网关</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    
    <link rel="stylesheet" href="/pc/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="/pc/layout/css/font_eolqem241z66flxr.css" media="all" />
</head>
<body class="childrenBody">
<form class="layui-form">
    {{ csrf_field() }}
    <div class="layui-form-item">
        <label class="layui-form-label">网关ID</label>
        <div class="layui-input-block" style="width: 25em;">
            <input type ="text" name="GatewayID" key="{{$data['id']}}" class="layui-input" value="{{$data['GatewayID']}}" placeholder="">
        </div>
    </div>
     <div class="layui-form-item">
        <label class="layui-form-label">网关名称</label>
        <div class="layui-input-block" style="width: 25em;">
            <input type ="text" name="designation" value="{{$data['name']}}" class="layui-input" placeholder="">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">区域</label>
        <div class="layui-input-block" style="width: 25em;">
            <select name="area" id="area" lay-verify="required" lay-search="" lay-filter="area">
                <option value="">请选择区域</option>
                @if(!empty($areaInfo))
                    @foreach($areaInfo as $val)
                        <option value="{{$val['id']}}" @if($data['area_id'] == $val['id'])selected @endif>{{$val['name']}}</option>
                    @endforeach
                @endif
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">房间</label>
        <div class="layui-input-block" style="width: 25em;">
            <select name="room" id="room" lay-verify="required" lay-search="">
                <option value="">请先选择建筑</option>
                @if(!empty($roomInfo))
                    @foreach($roomInfo as $val)
                        <option value="{{$val['id']}}" @if($data['room_id'] == $val['id'])selected @endif>{{$val['name']}}</option>
                    @endforeach
                @endif
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">位置</label>
        <div class="layui-input-block" style="width: 25em;">
            <input type ="text" name="loc" class="layui-input" placeholder="" value="{{$data['loc']}}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">型号</label>
        <div class="layui-input-block" style="width: 25em;">
            <select name="model" id="model_id" lay-verify="required" lay-search="">
                <option value="">请选择型号</option>
                @if(!empty($modelInfo))
                    @foreach($modelInfo as $val)
                        <option value="{{$val['id']}}" @if($data['model_id'] == $val['id'])selected @endif>{{$val['name']}}</option>
                    @endforeach
                @endif
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">功率</label>
        <div class="layui-input-block" style="width: 25em;">
            <select name="model" id="power" lay-verify="required" lay-search="">
                <option value="">请选择功率</option>
                <option value="31">31</option>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit="" lay-filter="editGateWay">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
<script type="text/javascript" src="/pc/layui/layui.js"></script>
<script type="text/javascript" src="/pc/gateway/js/edit.js"></script>
</body>
</html>